package com.xucy.springboot.designmodel.behavioral.iterator;

/**
 * @Author xucy
 * @Date 2019-07-30 10:30
 * @Description
 **/

public class CourseItrEx extends CourseItr {



    public CourseItrEx(CourseList courseList) {
        super(courseList);
    }

    @Override
    Course itrCourse() {
      return   courseList.getList().get(position);
    }

    @Override
    boolean isLastCourse() {
        if(position<courseList.getList().size()){
            return true;
        }
        return false;
    }
}
